<%@ page import="java.sql.*"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%! Connection myCon=null; %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Richiesta al db </title>
</head>
<body>
<%
String driver = "org.postgresql.Driver";
String url = "jdbc:postgresql://localhost:5432/DbInfo3";
String username = "postgres";
String password = "admin";
String myDataField ="";
PreparedStatement myPS = null;
ResultSet myRS = null;

if(myCon == null)
{

Class.forName(driver);
myCon = DriverManager.getConnection(url,username,password);
}

String myQuery = "SELECT c.parametro FROM caratteristiche c";
myPS = myCon.prepareStatement(myQuery);
myRS = myPS.executeQuery();

while(myRS.next())
{
	String par= myRS.getString("parametro");

%>
<P>
<b> <%=par%> </b>

<%
}
myPS.close();
%>


</body>
</html>